<div class="session frame">
    <div class="frame-left">
        <div class="frame-left-header">
            <div class="input-group input-placeholder">
                <span class="input-group-addon input-group-search">
                    <i class="fa fa-search fa-find"></i>
                </span>
                <input class="form-control frame-left-header-input" type="text" ng-model="keywords" placeholder="搜索"/>
            </div>
        </div>
        <div class="session-list" resize ng-style="{height:(winHeight-90)+'px'}">
            <div ng-class="{'session-list-item':true,'item-select':session.id==selectSession.id}" class="session-list-item clearfix"
                 ng-click="showSession(session)"
                 ng-repeat="session in sessionList | filter:{msName:keywords}"
                 ng-mouseenter="sessionRemove(session)" ng-mouseleave="sessionNotRemove(session)"
                 ng-if="session.show==true">
                <div class="display-inline">
                     <span>
                         <i ng-click="removeFromSession(session)" ng-if="session.removeSession==true" class="fa fa-close"></i>
                     </span>
                </div>
                <div class="display-inline" >
                     <span class="session-portrait{{session.portraitArray.length}}">
                        <span class="session-portrait-{{$index}}" ng-repeat="portrait in session.portraitArray track by $index">
                            <img  ng-src="{{portrait}}"/>
                        </span>
                    </span>
                    <span class="session-label">
                        {{ session.msName | limitTo: 6 }}{{session.msName.length > 6 ? '...' : ''}}
                    </span>
                    <span ng-if="session.unreadCount>0" class="badge pull-right">{{session.unreadCount}}</span>
                </div>
            </div>
        </div>
    </div>
    <div class="frame-right">
        <div class="default-view" ng-hide="selectSession">
            <img src="/node_static//images/logo.png">
        </div>
        <div class="session-chat" ng-show="selectSession">
            <div class="chat-header">
                <span class="chat-header-name">
                    {{ selectSession.msName| limitTo: 10}}{{selectSession.msName.length > 10 ? '...' : ''}}
                </span>
            </div>
            <div  class="chat-content" resize ng-style="{height:(winHeight-viewHeight-180)+'px','word-break':'break-all'}">
                <div ng-repeat="recorder in selectSession.recorders">
                    <div ng-if="recorder.type=='5'">
                        <recorder_tip recorder="recorder"></recorder_tip>
                    </div>
                    <div ng-if="recorder.type!='5'">
                        <div ng-if="recorder.isRight" >
                            <div ng-if="recorder.type!='2'&&recorder.type!='3'&&recorder.type!='9'">
                               <recorder_right_msg recorder="recorder"></recorder_right_msg>
                            </div>
                            <div ng-if="recorder.type=='3'">
                                <recorder_right_pic recorder="recorder"></recorder_right_pic>
                            </div>
                            <div ng-if="recorder.type=='2'">
                                <recorder_right_vol recorder="recorder"></recorder_right_vol>
                            </div>
                            <div ng-if="recorder.type=='9'">
                                <recorder_right_doc recorder="recorder"></recorder_right_doc>
                            </div>
                        </div>
                        <div ng-if="recorder.isLeft">
                            <div ng-if="recorder.type!='2'&&recorder.type!='3'&&recorder.type!='9'&&recorder.type!='10'">
                                <recorder_left_msg recorder="recorder" session="selectSession"></recorder_left_msg>
                            </div>
                            <div ng-if="recorder.type=='3'">
                                <recorder_left_pic recorder="recorder" session="selectSession"></recorder_left_pic>
                            </div>
                            <div ng-if="recorder.type=='2'">
                                <recorder_left_vol recorder="recorder" session="selectSession"></recorder_left_vol>
                            </div>
                            <div ng-if="recorder.type=='9'">
                                <recorder_left_doc recorder="recorder" session="selectSession"></recorder_left_doc>
                            </div>
                            <div ng-if="recorder.type=='10'">
                                <recorder_left_pos recorder="recorder" session="selectSession"></recorder_left_pos>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="chat-input">
                <div class="input-widget">
                    <!--表情-->
                    <span class="input-widget-face" ng-click="faceOn()">
                         <img ng-src="/node_static/images/face.png">
                    </span>
                    <!--图片上传-->
                    <span class="input-widget-pic" ngf-select
                          ngf-accept="'image/*'" ng-model="file" ngf-multiple="false">
                        <img ng-src="/node_static/images/pic.png">
                    </span>
                    <div class="emotion" ng-if="click">
                        <table>
                            <tr ng-repeat="items in emojiArray">
                                <td ng-repeat="item in items">
                                    <img ng-src="/node_static/images/emoji/{{item.img}}" ng-click="faceLable(item.label,blur())">
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div>
                    <textarea id="chat-input" ng-show="!view" type="text"  ng-model="msg" class="form-control" placeholder="输入...(ctrl+enter)" ng-keypress="send($event)" ng-blur="blur()" ng-focus="focu()"></textarea>
                    <div class="img-preview" ng-show="view">
                        <div class="img-preview-img">
                            <!--图片显示区域-->
                            <img ng-src="{{file.filePath}}">
                        </div>
                        <div class="img-preview-button">
                            <button type="button" class="btn btn-danger btn-xs" ng-click="imgDelete()">删除</button>
                            <!--//删除按钮-->
                        </div>
                    </div>
                    <div class="input-send">
                        <button ng-class="{'btn btn-default':msg.length==0&&!view,'btn btn-success':msg.length!=0||view}" ng-disabled="msg.length==0&&!view"  type="button" ng-click="doSend()">发送</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
